#ifndef REMOTE_CTRL_CAN_H
#define REMOTE_CTRL_CAN_H
#define RemoteCtrlCanLostTime	(1000/10)
typedef struct
{
	union
	{
		UINT8 Bytes[8];
		struct
		{
			UINT8 fButtonEnable:1;
			UINT8 fButtonHorn:1;
			UINT8 fButtonReleaseBrake:1;
			UINT8 fButtonLamp:1;
			UINT8 u8Byte0NC:4;

			UINT8 fButtonPlantformL_Out:1;
			UINT8 fButtonPlantformL_In:1;
			UINT8 fButtonPlantformR_Out:1;
			UINT8 fButtonPlantformR_In:1;
			UINT8 fButtonRangeExtenderStartOrStop:1;
			UINT8 fButtonRangeExtenderPreHeat:1;
			UINT8 u8Byte1NC:2;

			UINT8 fKnob_1:1;
			UINT8 fKnob_2:1;
			UINT8 fKnob_3:1;
			UINT8 fKnob_4:1;
			UINT8 fKnob_5:1;
			UINT8 fKnob_6:1;
			UINT8 u8Byte2NC:2;

			UINT8 u8Byte3NC;
			UINT8 u8Byte4NC;

			UINT8 u8SpeedRef;//0-255

			UINT8 u8Joystick;//后退：0-127,中位：128,前进：129-255
			UINT8 u8Rocker;//左转：0-127,中位：128,右转：129-255
		}bit;
	}unRx0x181;
	struct
	{
		UINT16 u16Rx0x181LostCnt;
		UINT8 fRx0x181Lost:1;
		UINT8 fRx0x181Update:1;
	}stRxCtrl;
	union
	{
		UINT8 Bytes[8];
		struct
		{
			UINT8 fWaringLed:1;
			UINT8 Byte0Nc:7;
			
			UINT8 BytesNc[7];
		}bit;
	}unTx0x201;
}structRemoteCtrlCan;
extern structRemoteCtrlCan stRemoteCtrlCan;
extern void vRemoteCtrlCanFastRxCallBack(UINT16 u16_id_hi,UINT16 u16_id_lo,UINT8 u8_length,UINT8 *pData);
extern void vRemoteCtrlCanRx(void);//10ms 主循环
extern void vRemoteCtrlCanTx(void);//10ms 主循环

#endif
